home *** CD-ROM | disk | FTP | other *** search
/ Family Forum 260 / SOMC Family Forum 260 - Disc 2.iso / somc / WordWise.dir / 00001_Script_1 next >
Text File  |  1999-01-14  |  5KB  |  206 lines

  1.  
  2. on startMovie
  3.   
  4.   --* set the number of question in word wise
  5.   
  6.   global NUMOFQUESTIONS
  7.   set NUMOFQUESTIONS to 21
  8.   
  9.    --* This declares the variables for the finger cursor. *
  10.   
  11.   global FINGER, FINGERMASK
  12.   set FINGER to the number of member "Finger1" 
  13.   set FINGERMASK to the number of member "Finger2" 
  14.   
  15.   --* set the paths and exe for the setups
  16.   
  17.   global E1SETUP,E2SETUP,E3SETUP,E4SETUP,INSTALL1, INSTALL2
  18.   set E1SETUP to "@\SETUP.EXE" --ADAM
  19.   set E2SETUP to "@\SETUP.EXE" --algebra
  20.   set E3SETUP to ""
  21.   set E4SETUP to ""
  22.   
  23.   set INSTALL1 to "@\DX5ENG.EXE"
  24.   set INSTALL2 to "@\SETUP1.EXE"  
  25.   
  26.   
  27.   
  28.   --* set weblink URLs
  29.   
  30.   global LINK1,LINK2,LINK3,LINK4,LINK5,LINK6,LINK7,LINK8,LINK9,LINK10
  31.   set link1 to "http://www.woodberry.org/acad/hist/FRWEB/index.htm"
  32.   set link2 to "http://users.massed.net/~mdurant/AncientEgyptWebquest.htm"
  33.   set link3 to "http://www.finaid.org"
  34.   set link4 to "http://www.ucla.edu/"
  35.   set link5 to "http://www.clet.ait.ac.th/el21open.htm"
  36.   set link6 to "http://www.biochemist.com/"
  37.   set link7 to "http://www.intellicast.com/"
  38.   set link8 to "http://libertyonline.hypermall.com/index.html"
  39.   set link9 to "http://www.quoteland.com/"
  40.   set link10 to "http://www.unc.edu/~rowlett/units/index.html"
  41.   
  42.   
  43.   
  44.   
  45.   
  46.   glowClear()
  47.   --* turn on altglows
  48.   glow(60,TRUE)
  49. end
  50.  
  51.  
  52.  
  53.  
  54. --* This handler hides/shows the glow images. eg: glow(5,TRUE) *
  55.  
  56. on glow WHICHSPRITE, TRUEORFALSE
  57.   set the visible of sprite WHICHSPRITE to TRUEORFALSE
  58. end glow
  59.  
  60. --* TURN OF ALL GLOWS ON START
  61. on glowClear
  62.   repeat with i = 50 to 65
  63.     glow(i)
  64.   end repeat
  65. end
  66.  
  67. --* This handler switches the text color for a glow effect. eg.textglow("Hello",1)*
  68.  
  69. on textglow WHICHMEMBER, COLORNUMBER
  70.   set the foreColor of member WHICHMEMBER to COLORNUMBER  
  71. end textglow
  72.  
  73. --* This is for using a HotSpot or Button for closing the window or a overlaid
  74. --* cover up sprite THIS IS AN EXAMPLE NOT A HANDLER
  75.  
  76. --on mouseUp
  77. --  global  enableHotspots
  78. --  doClick()
  79. --  if (the visible of sprite 35) then
  80. --    hideFonts()
  81. --    restoreBI()
  82. --  else
  83. --    close window "BIART"
  84. --    forget window "BIART"
  85. --    tell the stage to enableHotspots()
  86. --  end if
  87. --end mouseUp
  88.  
  89. --* THIS HANDLER EXAMPLE OF DISABLEING HOTSPOTS WHEN RUNNING MIAW*
  90. --on mouseEnter
  91. --  if not count(the windowList) then
  92. --    doRollover(52)
  93. --  end if
  94. --end
  95. --
  96. --
  97. --on mouseLeave
  98. --  if not count(the windowList) then
  99. --    doRollout(52)
  100. --  end if
  101. --end
  102.  
  103.  
  104.  
  105. --* THIS HANDLER OPEN AND CENTERS A MOVIE IN A WINDOW *
  106.  
  107. on openMIAW MYWINDOW
  108.   set myRect=the rect of window MYWINDOW
  109.   set myStage=the rect of the Stage
  110.   set myWidth=(getAt(myRect,3)-getAt(myRect,1))
  111.   set myHeight=(getAt(myRect,4)-getAt(myRect,2))
  112.   set myLocH=((getAt(myStage,3)+getAt(myStage,1))/2)-(myWidth/2)
  113.   set myLocV=((getAt(myStage,2)+getAt(myStage,4))/2)-(myHeight/2)
  114.   set myNewRect=rect(myLocH,myLocV,(myLocH+myWidth),(myLocV+myHeight))
  115.   set the rect of window MYWINDOW=myNewRect
  116.   set the windowType of window MYWINDOW to 2
  117.   open window MYWINDOW
  118. end openMIAW
  119.  
  120.  
  121. --* THESE HANDLERS TURN ON A GLOW, TURN POINTER A HAND AND PLAYS A SOUND *
  122. --
  123. --on doRollover numsprite
  124. --  glow(numsprite,TRUE)
  125. --  global finger,fingermask
  126. --  cursor[finger,fingermask]
  127. --  updatestage
  128. --  puppetsound 1, "rollsound"
  129. --  --  repeat while soundbusy(1)
  130. --  --  end repeat
  131. --end
  132.  
  133.  
  134.  
  135.  
  136. --* THIS HANDLER TURNS THE SPRITE PASSED TO IT TO INVISIBLE AND RESETS THE CURSOR
  137. on doRollout numsprite
  138.   glow(numsprite,FALSE)
  139.   cursor 0
  140. end
  141.  
  142. --* PLAYS A CLICK SOUND
  143.  
  144. on doClick
  145.   puppetsound 1,"clicksound"
  146.   updateStage
  147. end
  148.  
  149. --* CHECK THE ANSWER FOR WORDWIZE
  150.  
  151. on  checkAnswer 
  152.   
  153.   global CORRECT,Ncount,ANSWER,TRIES,RIGHT
  154.   
  155.   put line Ncount of the text of member "ww3" into member "definition" 
  156.   set the fontSize of member "definition" to 18
  157.   set the fontstyle of member "definition" to "bold" 
  158.   glow(20,TRUE)
  159.   set TRIES to TRIES + 1
  160.   if answer = CORRECT then 
  161.     glow(52,TRUE)
  162.     puppetsound 1,"Woww1"
  163.     updateStage
  164.     set RIGHT to RIGHT + 1
  165.   else 
  166.     glow(53,TRUE)
  167.     puppetsound 1,"Buzzer2"
  168.     updateStage
  169.   end if
  170. end
  171.  
  172. on finish
  173.   
  174.   global TRIES,RIGHT,scoreSTR
  175.   
  176.   go to "FIN"
  177.   if (TRIES) THEN
  178.     if ((float(RIGHT) / float(TRIES)) > .49) then
  179.       puppetsound 1,"Glfclap1"
  180.       updateStage
  181.     end if
  182.   end if
  183.   set scoreSTR2 to "YOU GOT"&&string(RIGHT)&&"OUT OF"&&string(TRIES)&&"RIGHT"
  184.   set the text of member "scoreSTR" to scoreSTR2
  185.   updateStage
  186.   
  187. end
  188.  
  189.  
  190.  
  191. on doRollover numsprite,SOUNDNUM
  192.   glow(numsprite,TRUE)
  193.   global finger,fingermask
  194.   cursor[finger,fingermask]
  195.   updatestage  
  196.   case SOUNDNUM of
  197.     1:
  198.       puppetsound 1, "rollsound"
  199.       --  repeat while soundbusy(1)
  200.       --  end repeat
  201.     2:
  202.       puppetsound 1, "rollsound2"
  203.       --  repeat while soundbusy(1)
  204.       --  end repeat      
  205.   end case  
  206. end